import { create } from "zustand";

export const createUserSlice = (set: any) => ({
  currentUser: {},
  getUserInfo: async () => {
    set({ currentUser: {} });
  },
});

export const createInitSlice = (set: any) => ({
  initialize: async () => {
    await Promise.all([createUserSlice(set).getUserInfo()]);
  },
});

export const useGlobalStore = create((...args) => ({
  ...createUserSlice(args[0]),
  ...createInitSlice(args[0]),
}));
